//
//  WallCollectionHeadView.m
//  ZiJinLian
//
//  Created by 🐛 on 2017/4/14.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "WallCollectionHeadView.h"

@implementation WallCollectionHeadView

- (id)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.backgroundColor=Gray_Color;
        CGFloat weith=(MainW-25)/2;
        self.BgImag=[[UIImageView alloc]initWithFrame:CGRectMake((MainW-weith)/2, 45, weith, 2*weith/3)];
        self.BgImag.image=[UIImage imageNamed:@"img_wish"];
        [self addSubview:self.BgImag];
        self.titleLb=[[MYLabel alloc]init];
        self.titleLb.text=@"恭喜恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财恭喜发财";
        self.titleLb.numberOfLines=0;
        self.titleLb.textColor=Red_Color;
        [self.BgImag addSubview:self.titleLb];
        [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(10);
            make.right.equalTo(0);
            make.left.equalTo(10);
            make.bottom.equalTo(-10);
        }];
        self.headTitle=[[MYLabel alloc]initWithFrame:CGRectMake(10, 15, MainW-10, 20)];
        self.headTitle.text=@"您的心愿已递交佛祖,生成愿望墙!";
        self.headTitle.textColor=TextColor3;
        [self addSubview:self.headTitle];
        self.otherBtn=[[UIButton alloc]init];
        [self.otherBtn setTitle:@"他们都恭请了佛祖让愿望早日实现,快去看看吧>>" forState:UIControlStateNormal];
        [self.otherBtn setTitleColor:HJ_Color(230, 81, 3) forState:UIControlStateNormal];
        self.otherBtn.titleLabel.font=FontAndStyle14;
        [self addSubview:self.otherBtn];
        [self.otherBtn addTarget:self action:@selector(otherBtnClick) forControlEvents:UIControlEventTouchUpInside];
        [self.otherBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.BgImag.mas_bottom).offset(10);
            make.right.left.equalTo(0);
            make.bottom.mas_equalTo(self.mas_bottom).offset(-10);
        }];
        
    }
    return self;
}
-(void)otherBtnClick{
    [_delegate otherBtnClick];
}

@end
